package br.ufmt.baseDeDados;

import java.util.ArrayList;
import java.util.List;

import br.ufmt.exception.ObraException;
import br.ufmt.model.Obra;
import br.ufmt.model.Rotulo;

public class Obras {

	private static List<Obra> obras = new ArrayList<Obra>();

	public static List<Obra> getObras() {
		if (obras.isEmpty()) {
			try {
				obras.add(new Obra(
						"1",
						"Crepúsculo",
						"O filme dos vampiros mais irado de todos",
						Rotulo.getRotuloPorNome("Super Lançamento"),
						"http://upload.wikimedia.org/wikipedia/pt/thumb/5/56/Crep%C3%BAsculo_livro.jpg/240px-Crep%C3%BAsculo_livro.jpg"));

				obras.add(new Obra(
						"2",
						"Batman",
						"O filme dos morcegos mais legal!",
						Rotulo.getRotuloPorNome("Lançamento"),
						"http://2.bp.blogspot.com/-Pf0LOhp8s_k/UBDUgKfxZ3I/AAAAAAAABBs/dIIZLztd5g8/s1600/BATMAN+O+CAVALEIRO+DAS+TREVAS.jpg"));

				obras.add(new Obra(
						"3",
						"Cisne Negro",
						"A ballet dancer wins the lead in 'Swan Lake' and is perfect for the role of the delicate White Swan - Princess Odette - but slowly loses her mind as she becomes more and more like Odile, the Black Swan.me dos morcegos mais legal!",
						Rotulo.getRotuloPorNome("Lançamento"),
						"http://upload.wikimedia.org/wikipedia/pt/thumb/c/c1/BlackSwanCartaz.jpg/225px-BlackSwanCartaz.jpg"));

				obras.add(new Obra(
						"4",
						"Fight Club",
						"An insomniac office worker and a devil-may-care soap maker form an underground fight club that transforms into a violent revolution.",
						Rotulo.getRotuloPorNome("Antigo"),
						"http://ia.media-imdb.com/images/M/MV5BMTc1ODg1NTMxNV5BMl5BanBnXkFtZTYwOTg4Njk4._V1._SY317_CR4,0,214,317_.jpg"));

				obras.add(new Obra(
						"5",
						"O Senhor dos Anéis: A Sociedade do Anel",
						"An innocent hobbit of The Shire journeys with eight companions to the fires of Mount Doom to destroy the One Ring and the dark lord Sauron forever.",
						Rotulo.getRotuloPorNome("Super Lançamento"),
						"http://1.bp.blogspot.com/-R9jnJ7l9d88/UCgc9SD515I/AAAAAAAADxU/HKlx2DH3260/s1600/capa_cover_filme_o-senhor-dos-aneis-1-sociedade-do-anel-baixartorrentcompleto.blogspot.com.br.jpg"));

				obras.add(new Obra(
						"6",
						"A Origem",
						"In a world where technology exists to enter the human mind through dream invasion, a highly skilled thief is given a final chance at redemption which involves executing his toughest job to date: Inception.",
						Rotulo.getRotuloPorNome("Lançamento"),
						"http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1._SY317_.jpg"));

			} catch (ObraException e) {
				e.printStackTrace();
			}
		}
		return obras;
	}

	public static void setObras(List<Obra> obras) {
		Obras.obras = obras;
	}

}
